package cn.wenhe9.yygh.order.service;

import cn.wenhe9.yygh.model.order.OrderInfo;
import cn.wenhe9.yygh.model.order.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author DuJinliang
 * 2022/4/8
 */
public interface PaymentService extends IService<PaymentInfo> {
    /**
     * 向支付记录表中添加记录
     * @param orderInfo OrderInfo
     * @param status Integer
     */
    void savePaymentInfo(OrderInfo orderInfo, Integer status);

    /**
     * 更新订单状态
     * @param outTradeNo String
     * @param resultMap Map<String, String>
     */
    void paySuccess(String outTradeNo, Map<String, String> resultMap);

    /**
     * 获取支付记录
     * @param orderId Long
     * @param paymentType Integer
     * @return PaymentInfo
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);
}
